<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <ul id="news">
        <!-- <li>
            <span>新闻的内容</span>
            <span>2022-02-02</span>
        </li> -->
    </ul>


    <script>

        var data = [
            ['1', '今天天气不错' , '2022-02-02'],
            ['2','今天天气不错2' , '2022-02-04'],
            ['3','今天天气不错3' , '2022-02-12'],
            ['4','今天天气不错4' , '2022-02-02'],
        ] ;


        // 如何生成 ？？

        // 生成的内容当做字符串
        var res = '' ;
        for(var i in data) {
            res += '<li>' ;
            for(var j in data[i]) {
                res += '<span>' + data[i][j] +  '</span>';
            }
            res += '</li>' ;
        }

        var oUl = document.getElementById('news') ;
        oUl.innerHTML = res ;

    </script>
    
</body>
</html>